#pragma once 
#include "win_handle.hpp"

namespace winboost {
	namespace dc {

class paint 
{
public:
	paint(resources::win_handle* pwnd):
     m_hdc(NULL)
   , m_hwnd(NULL)
   {
      m_hwnd = pwnd->handle();
      m_hdc = ::BeginPaint(m_hwnd, &m_ps);
   }

   ~paint(void)
   {
      ::EndPaint(m_hwnd, &m_ps);
   }

   HDC get_hdc(void) const { return m_hdc; }
   HWND get_hwnd(void) const { return m_hwnd; }
   PAINTSTRUCT get_ps(void) const { return m_ps; }

private:
   HDC m_hdc;
   PAINTSTRUCT m_ps;
   HWND m_hwnd;
};

	}
}
